"use strict";
let a;
let b;
let c;
a = 'hello';
b = -99;
c = false;
console.log(a, b, c);
function count(x, y) {
    return x + y;
}
// 对象类型，object 和 Object 都不方便使用，所以用{}来定义对象类型
let person;
person = {
    name: 'jack',
    age: 18, // 可选属性，所以可写可不写
    gender: 'male' // 自定义属性，方便给对象任意添加属性
};
// 函数类型     此处的箭头  =>  在声明时表示函数类型，描述参数和返回值类型
let count1;
// count1 = function(x,y){
//   return x + y
// }
count1 = (x, y) => x + y; //此处的箭头  =>   是具体的函数实现
// 数组类型    元组类型被数组类型包含
let arr1;
let arr2;
arr1 = ['a', 'b'];
arr2 = [1, 2, 3];
// 枚举类型 数字枚举有反向映射，而字符串枚举则没有反向映射
var Direction;
(function (Direction) {
    Direction[Direction["Up"] = 0] = "Up";
    Direction[Direction["Down"] = 1] = "Down";
    Direction[Direction["Left"] = 2] = "Left";
    Direction[Direction["Right"] = 3] = "Right";
})(Direction || (Direction = {}));
function test(state) {
    console.log(state);
}
